Ext.define('BEST.view.menu.List' ,{
    extend: 'Ext.tree.Panel',
    alias : 'widget.menulist',
    store: 'MenuListStore',
    title : '模块列表',
    initComponent: function() {
    	Ext.apply(this,{
    		animate:true,//展开折叠是否有动画特效
    		collapsible: false, //是否以折叠的方式展示
    		columnLines:true,//添加列边框
    		rowLines:true,
	        useArrows: true,  
	        rootVisible: false,  
	        multiSelect: true,  
        	singleExpand: false,
        	expanded : true,
    		columns:[
	    	{  
	            xtype: 'treecolumn', 
	            text: '模块名称',  
	            flex: 1,  
	            expanded : true,
	            sortable: true,  
	            dataIndex: 'text'  
	        },{
	        	text:'模块图标',
	        	flex:1,
	        	align: 'center',
	        	dataIndex:'iconCls'
	        
	        },{
	        	text:'模块连接',
	        	flex:1,
	        	align: 'center',
	        	dataIndex:'url'
	        
	        },{
	        	text:'是否叶节点',
	        	flex:1,
	        	align: 'center',
	        	dataIndex:'leaf',
	        	renderer:function(value){
            		if(value==1){
            			return "<span style='color:green'>是</span>";
            		}else{
            			return "<span style='color:red'>否</span>";
            		}
            	}
	        }]
	    	});
        this.callParent(arguments);
    }
});